package com.sevencar.peterview;

import java.util.ArrayList;

import com.sevencar.R;

import android.annotation.SuppressLint;
import android.annotation.TargetApi;
import android.os.Build;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentActivity;

@SuppressLint("NewApi")
public class TestActivity extends FragmentActivity {

    @TargetApi(Build.VERSION_CODES.HONEYCOMB)
	@Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        
        // Dummy Data
		ArrayList<ImageData> result = new ArrayList<ImageData>();
		for (int i = 1; i <= 20; i++) {
			result.add(new ImageData("Title" + i, i + ".jpg"));
		}
        
        Fragment f = MyFragment.newInstance(result);
//        TestActivity.super.getFragmentManager().beginTransaction().add(R.id.sample_content_fragment, f).commit();
        TestActivity.super.getSupportFragmentManager().beginTransaction().add(R.id.sample_content_fragment,f).commit();
		
    }

}
